<include file="header" />
<head>
	<link rel="stylesheet" href="/assets/base/repair/js/sweetalert/lib/sweet-alert.css">
</head>
<body>
<div class="wraper">
    <div class="load">
        <img class="load-bee" src="/assets/base/restaurant/images/load-bee.png"/>

    </div>
    <div class="top">
        <p>
            <a href="/base/restaurant/index/res_id/{BEESCRM:$res_id}" class="iconfont icon-zuo pull-left"></a>
	        <if condition="$type eq 1">
		        <a href="#" class="order-all pull-left">全部订单<span class="iconfont icon-you xiajiantou"></span></a>
	        </if>
            <if condition="$type eq 2">
		        <a href="#" class="order-all pull-left">交易成功<span class="iconfont icon-you xiajiantou"></span></a>
	        </if>
            <if condition="$type eq 3">
		        <a href="#" class="order-all pull-left">等待配送<span class="iconfont icon-you xiajiantou"></span></a>
	        </if>
            <if condition="$type eq 4">
		        <a href="#" class="order-all pull-left">等待确认<span class="iconfont icon-you xiajiantou"></span></a>
	        </if>
            <if condition="$type eq 5">
		        <a href="#" class="order-all pull-left">等待评价<span class="iconfont icon-you xiajiantou"></span></a>
	        </if>
			<if condition="$type eq 9">
				<a href="#" class="order-all pull-left">已退款<span class="iconfont icon-you xiajiantou"></span></a>
			</if>
	        <if condition="$type eq 6">
		        <a href="#" class="order-all pull-left">等待付款<span class="iconfont icon-you xiajiantou"></span></a>
	        </if>
        </p>
    </div>
    <div class="order-type">
        <p class="close"><span class="iconfont icon-guanbi"></span></p>
        <a href="/base/restaurant/myOrder/type/1/res_id/{BEESCRM:$res_id}">全部订单</a>
        <a href="/base/restaurant/myOrder/type/2/res_id/{BEESCRM:$res_id}">交易成功</a>
        <a href="/base/restaurant/myOrder/type/6/res_id/{BEESCRM:$res_id}">等待付款</a>
        <a href="/base/restaurant/myOrder/type/3/res_id/{BEESCRM:$res_id}">等待配送</a>
        <a href="/base/restaurant/myOrder/type/4/res_id/{BEESCRM:$res_id}">等待确认</a>
        <a href="/base/restaurant/myOrder/type/5/res_id/{BEESCRM:$res_id}">等待评价</a>
		<a href="/base/restaurant/myOrder/type/9/res_id/{BEESCRM:$res_id}">已退款</a>
    </div>
	<volist name="data" id="vo">
    <div class="order-lists lists">
        <div class="lists tb-mode">
            <a href="/base/restaurant/restaurant/id/{BEESCRM:$vo.restaurant_id}/sign/1/res_id/{BEESCRM:$res_id}" class="tb-cell list-left">{BEESCRM:$vo.RestaurantInfo.restaurant_name}</a>
            <div class="tb-cell list-right status">
				<if condition="$vo['status'] eq 0">
					等待付款
				<elseif condition="$vo['status'] eq 1" />
					支付成功,等待发货
				<elseif condition="$vo['status'] eq 2" />
					已发货,等待收货
				<elseif condition="$vo['status'] eq 3" />
					确认收货,等待评价
				<elseif condition="$vo['status'] eq 4" />
					已评价
				<elseif condition="$vo['status'] eq 6" />
					交易成功
				<elseif condition="$vo['status'] eq 9" />
					<span style="color: #b81515">已退款</span>
				</if>
            </div>
        </div>
        <div class="lists tb-mode foods">
            <a href="/base/restaurant/restaurant/id/{BEESCRM:$vo.restaurant_id}/sign/1/res_id/{BEESCRM:$res_id}" class="tb-cell list-left">
                <div class="img-box"><img src="{BEESCRM:$vo.RestaurantInfo.logo_url}"></div>
            </a>
            <a href="/base/restaurant/orderDetail/order_id/{BEESCRM:$vo.order_id}/res_id/{BEESCRM:$res_id}" class="tb-cell list-center">
                <p>点了 <volist name="vo.RestaurantOrderGoods" id="v">
	                        {BEESCRM:$v.goods_name} &nbsp;&nbsp;
	                    </volist>
	                等{BEESCRM:$vo.RestaurantOrderGoods.count}样菜</p>
                <p class="prize">{BEESCRM:$vo.money_sum}元</p>
            </a>
        </div>
        <div class="lists tb-mode bottom-none">
            <p class="tb-cell list-left time" style="width: 10%;">创建时间{BEESCRM:$vo.create_time|date="Y-m-d H:i",###}</p>
	        <if condition="$vo.status eq 4">
                <div class="tb-cell list-right"><span class="order-btn cancle">已评价</span></div>
		    </if>
	        <if condition="$vo.status eq 3">
                <div class="tb-cell list-right"><a href="javascript:void(0);" class="order-btn pinjia" data-id="{BEESCRM:$vo.restaurant_id}" data-order_id="{BEESCRM:$vo.order_id}">评价</a></div>
		    </if>
	        <if condition="$vo.status eq 2">
		        <div class="tb-cell list-right"><a href="javascript:void(0);" class="order-btn success sure-btn" data-order_id="{BEESCRM:$vo.order_id}" >确认收货</a></div>
	        </if>
	        <if condition="$vo.status eq 0">
		        <div class="tb-cell list-right">
                    <a href="javascript:void(0);" class="order-btn cancle reset" data-order_id="{BEESCRM:$vo.order_id}">取消</a>
                    <a href="/base/?m=restaurant&a=confirmOrders&order_id={BEESCRM:$vo.order_id}&res_id={BEESCRM:$res_id}" class="order-btn success" data-order_id="{BEESCRM:$vo.order_id}">去付款</a>
                </div>
	        </if>
	        <if condition="$vo.status eq 1 ">
                <div class="tb-cell list-right">
                    <if condition="$account_id eq 60 || $account_id eq 61 || $account_id eq 47 || $account_id eq 4">
                        <a href="javascript:void(0);" class="order-btn cancle apply" data-order_id="{BEESCRM:$vo.order_id}">取消订单</a>
                    </if>
                    <span class="order-btn cancle">待发货</span>
                </div>
	        </if>

	        <if condition="$vo.status eq 7">
		        <div class="tb-cell list-right"><a class="order-btn cancle">已取消</a></div>
	        </if>
	        <if condition="$vo.status eq 8">
		        <div class="tb-cell list-right"><a class="order-btn cancle">已关闭</a></div>
	        </if>
            <if condition="$vo.status eq 10">
                <div class="tb-cell list-right"><a class="order-btn cancle">已取消,待审核</a></div>
            </if>
            <if condition="$vo.status eq 11">
                <div class="tb-cell list-right"><a class="order-btn cancle">待发货</a></div>
            </if>
            <if condition="$vo.status eq 12">
                <div class="tb-cell list-right"><a class="order-btn cancle">已审核,待退款</a></div>
            </if>
        </div>
    </div>
	</volist>

	<div class="pop-box" id="order-comment">
		<div class="main comment-box">
			<div class="top">
				<p>
					<a href="javascript:void(0);" class="iconfont icon-guanbi pull-left" id="pj-close"></a>
					<a href="#" class="order-all pull-left">发表评价</a>
				</p>
			</div>
			<div class="block-opacity block-bg">
				<p class="bow"><img src="/assets/base/restaurant/images/bow.png"></p>
				<p>评论一下，消消食~</p>
			</div>
			<div class="lists">
				<p class="stars star1">
					口味：
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
				</p>
			</div>

			<div class="lists">
				<p class="stars star2">
					质量：
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
				</p>
			</div>

			<div class="lists">
				<p class="stars star3">
					配送：
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
					<span class="iconfont icon-xingxing star big-star grey-star"></span>
				</p>
			</div>
			<div class="lists tb-mode">
				<p class="stars tb-cell" style="width: 36px;">内容：</p>
				<textarea placeholder="请输入内容" class="tb-cell pj-nr" id="comment" maxlength="330"></textarea>
			</div>
			<input class="rstid" type="hidden">
			<input class="order_id" type="hidden">
			<a href="javascript:void(0);" class="pj-btn">确认提交</a>
		</div>
	</div>
    <div class="pop_box hide">
        <div class="pop-hint">
            <div class="pop-main">
                <div class="title text-center">您是否进行取消订单操作？</div>
                <div class="pop-txt text-center">
                    <span>取消原因：</span>
                    <input class="pop-input" type="text" id="reason">
                </div>
            </div>
            <input type="hidden" id="order_id" value="">
            <div class="pop_bottom text-center">
                <a type="button" class="pop_btn active">确定</a>
                <a type="button" class="pop_btn quxiao">取消</a>
            </div>
        </div>
    </div>

	<input id="res_id" type="hidden" value="{BEESCRM:$res_id}">
    <div class="btn-box">
        <a href="/base/restaurant/index/res_id/{BEESCRM:$res_id}" class="btn"><span class="iconfont icon-weiwaimai"></span> 点外卖</a>
        <a href="/base/restaurant/myOrder/res_id/{BEESCRM:$res_id}" class="btn actived"><span class="iconfont icon-dingdan"></span> 我的订单</a>
    </div>
</div>

<include file="commonJS" />
<script src="/assets/activity/vote/js/classie.js"></script>
<script src="/assets/base/restaurant/js/order.js"></script>
<script src="/assets/activity/vote/js/modalEffects.js"></script>
<script>
	$('#pj-close').click(function(){
		$('.pop-box').hide();
	})
    $('.apply').click(function () {
        var order_id = $(this).data('order_id')
        $('#order_id').val(order_id);
        $('.pop_box').removeClass('hide');
    })
    $('.quxiao').click(function () {
        $('.pop_box').addClass('hide');
    })
</script>
</body>
</html>
